Integrand size = 30, antiderivative size = 61 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=-\frac {a A \text {arctanh}(\cos (c+d x))}{8 d}-\frac {a A \cot (c+d x) \csc (c+d x)}{8 d}+\frac {a A \cot (c+d x) \csc ^3(c+d x)}{4 d} \]
-1/8*a*A*arctanh(cos(d*x+c))/d-1/8*a*A*cot(d*x+c)*csc(d*x+c)/d+1/4*a*A*cot (d*x+c)*csc(d*x+c)^3/d
Time = 0.17 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.92 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=-a A \left (\frac {\csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {\csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}\right ) \]
-(a*A*(Csc[(c + d*x)/2]^2/(32*d) - Csc[(c + d*x)/2]^4/(64*d) + Log[Cos[(c + d*x)/2]]/(8*d) - Log[Sin[(c + d*x)/2]]/(8*d) - Sec[(c + d*x)/2]^2/(32*d) + Sec[(c + d*x)/2]^4/(64*d)))
Time = 0.43 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {3042, 4450, 3042, 3091, 3042, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A \csc (c+d x)+A) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc (c+d x)^3 (a-a \csc (c+d x)) (A \csc (c+d x)+A)dx\) |
\(\Big \downarrow \) 4450 |
\(\displaystyle -a A \int \cot ^2(c+d x) \csc ^3(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -a A \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle -a A \left (-\frac {1}{4} \int \csc ^3(c+d x)dx-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -a A \left (-\frac {1}{4} \int \csc (c+d x)^3dx-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle -a A \left (\frac {1}{4} \left (\frac {\cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \csc (c+d x)dx\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -a A \left (\frac {1}{4} \left (\frac {\cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} \int \csc (c+d x)dx\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -a A \left (\frac {1}{4} \left (\frac {\text {arctanh}(\cos (c+d x))}{2 d}+\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )\) |
-(a*A*(-1/4*(Cot[c + d*x]*Csc[c + d*x]^3)/d + (ArcTanh[Cos[c + d*x]]/(2*d) + (Cot[c + d*x]*Csc[c + d*x])/(2*d))/4))
3.1.7.3.1 Defintions of rubi rules used
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp [((-a)*c)^m Int[ExpandTrig[(g*csc[e + f*x])^p*cot[e + f*x]^(2*m), (c + d* csc[e + f*x])^(n - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]
Time = 0.96 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.90
method | result | size |
parallelrisch | \(-\frac {A a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-1\right )}{64 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}\) | \(55\) |
norman | \(\frac {\frac {A a}{64 d}-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{64 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}+\frac {A a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}\) | \(57\) |
derivativedivides | \(\frac {-A a \left (\left (-\frac {\csc \left (d x +c \right )^{3}}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{8}\right )+A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(91\) |
default | \(\frac {-A a \left (\left (-\frac {\csc \left (d x +c \right )^{3}}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{8}\right )+A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(91\) |
parts | \(\frac {A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}-\frac {A a \left (\left (-\frac {\csc \left (d x +c \right )^{3}}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{8}\right )}{d}\) | \(93\) |
risch | \(\frac {A a \left ({\mathrm e}^{7 i \left (d x +c \right )}+7 \,{\mathrm e}^{5 i \left (d x +c \right )}+7 \,{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d}-\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d}\) | \(101\) |
-1/64*A*a*(tan(1/2*d*x+1/2*c)^8-8*ln(tan(1/2*d*x+1/2*c))*tan(1/2*d*x+1/2*c )^4-1)/d/tan(1/2*d*x+1/2*c)^4
Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (55) = 110\).
Time = 0.25 (sec) , antiderivative size = 129, normalized size of antiderivative = 2.11 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {2 \, A a \cos \left (d x + c\right )^{3} + 2 \, A a \cos \left (d x + c\right ) - {\left (A a \cos \left (d x + c\right )^{4} - 2 \, A a \cos \left (d x + c\right )^{2} + A a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (A a \cos \left (d x + c\right )^{4} - 2 \, A a \cos \left (d x + c\right )^{2} + A a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{16 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]
1/16*(2*A*a*cos(d*x + c)^3 + 2*A*a*cos(d*x + c) - (A*a*cos(d*x + c)^4 - 2* A*a*cos(d*x + c)^2 + A*a)*log(1/2*cos(d*x + c) + 1/2) + (A*a*cos(d*x + c)^ 4 - 2*A*a*cos(d*x + c)^2 + A*a)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)
\[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=- A a \left (\int \left (- \csc ^{3}{\left (c + d x \right )}\right )\, dx + \int \csc ^{5}{\left (c + d x \right )}\, dx\right ) \]
Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (55) = 110\).
Time = 0.23 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.97 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=-\frac {A a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 4 \, A a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{16 \, d} \]
-1/16*(A*a*(2*(3*cos(d*x + c)^3 - 5*cos(d*x + c))/(cos(d*x + c)^4 - 2*cos( d*x + c)^2 + 1) - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) - 4*A *a*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + log(cos( d*x + c) - 1)))/d
Time = 0.28 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.75 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {4 \, A a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - \frac {A a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {{\left (A a - \frac {2 \, A a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}}{64 \, d} \]
1/64*(4*A*a*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - A*a*(cos(d *x + c) - 1)^2/(cos(d*x + c) + 1)^2 + (A*a - 2*A*a*(cos(d*x + c) - 1)^2/(c os(d*x + c) + 1)^2)*(cos(d*x + c) + 1)^2/(cos(d*x + c) - 1)^2)/d
Time = 19.26 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.92 \[ \int \csc ^3(c+d x) (a-a \csc (c+d x)) (A+A \csc (c+d x)) \, dx=\frac {A\,a\,\left (8\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+1\right )}{64\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4} \]